package com.changjiang.myproductsale.myproduct;

import com.changjiang.myproductsale.myproduct.dao.impl.ProductImpl;
import com.changjiang.myproductsale.myproduct.dao.impl.UserImpl;
import com.changjiang.myproductsale.myproduct.entity.Product;

import java.util.List;

//extends BaseDao
public class Test  {

//    public void add(){
//        String sql="insert into goods_cart values (40,1,12,1,CURDATE(),null)";
//        try {
//            System.out.println(executeUpdate(sql));
//
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
    public static void main(String[] args) {
//        new Test().add();
        //UserImpl userImpl=new UserImpl();
        //System.out.println(userImpl.delete(12));
        //System.out.println( userImpl.queryByName("huangche"));
        //System.out.println( userImpl.login("huangche","huangche"));

        ProductImpl productImpl=new ProductImpl();
        List<Product> plist = productImpl.getProductByCatePage(3,5,1);
        System.out.println("长度："+plist.size());
//        for (Product p:plist){
//            System.out.println(p.toString());
//        }
        System.out.println("总数："+productImpl.getProductCountByCate(3));


    }
}
